<?php

namespace app\home\controller;

use think\Controller;
use think\Session;

class HomeController extends Controller
{
	public function _initialize()
	{
		//判断session是否存在
		if( empty(Session::get('uid')) ){
			//跳转到 登陆页
			$this->error('请登录','login/index');die;
		}
	}
	
}